package com.sywb.chuangyebao.view.fragment;

import android.os.Bundle;
import android.view.View;

import com.sywb.chuangyebao.contract.UserVideoContract;

/**
 * 个人主页-视频
 */
public class UserVideoFragment extends BaseRefreshFragment<UserVideoContract.Presenter> implements UserVideoContract.View {

    private int uid;//资讯文章发布者ID -1:所有发布者 用户ID,可用-1代表不限制 0:创业万里行

    /**
     * Fragment 实例
     */
    public static UserVideoFragment newInstance(Object... pramars) {
        UserVideoFragment fragment = new UserVideoFragment();
        fragment.setArguments(getBundle(pramars));
        return fragment;
    }

    @Override
    public void initView(View view, Bundle bundle) {
        super.initView(view, bundle);
        if (bundle == null) {
            uid = getArguments().getInt("p0", 0);
        } else {
            uid = bundle.getInt("p0", 0);
        }
    }

    @Override
    public void initPresenter() {
        mPresenter.initPresenter(this);
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        outState.putInt("p0", uid);
        super.onSaveInstanceState(outState);
    }

    @Override
    public boolean useRxBus() {
        return false;
    }

    @Override
    public int getUId() {
        return uid;
    }
}
